package com.safe.app.utils.constants;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * 系统框架常量
 */
public class SystemConstant {

    /**
     * jackson 序列化
     */
    public static final ObjectMapper OBJECT_MAPPER;

    static {
        OBJECT_MAPPER = new ObjectMapper();
        OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
        OBJECT_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
    }

    /**
     * sessionId key
     */
    public static final String SAFE_APP_SESSION_ID = "safe_app_session_id_";
    public static final String LOGIN_USER_KEY = "loginUser";
    public static final String USER_ACCOUNT_STATUS_ACTIVE = "ACTIVE";
    public static final String USER_ACCOUNT_STATUS_FRBIDDEN = "FRBIDDEN";

    /**
     * redis config 配置
     */
    public static final String REDIS_CONFIG_PREFIX = "redis.config";

    /**
     * 云存储配置KEY
     */
    public final static String CLOUD_STORAGE_CONFIG_KEY_QINIU = "cloud_storage_config_key_qiniu";

    /**
     * oos config 配置
     */
    public static final String OSS_CONFIG_PREFIX = "oss.qiuniu";
}
